package com.ayit.car.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 消息表
 * @TableName messages
 */
@TableName(value ="messages")
public class Messages implements Serializable {
    /**
     * 唯一标识符
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 发送者用户ID
     */
    private Long senderEmployeeId;

    /**
     * 接收者用户ID
     */
    private Long receiverUserId;

    /**
     * 消息文本内容
     */
    private String messageText;

    /**
     * 发送时间
     */
    private Date sentAt;

    /**
     * 消息类型
     */
    private Object messageType;

    /**
     * 关联的订单ID，如果有
     */
    private Long relatedOrderId;

    /**
     * 阅读状态，未读/已读
     */
    private Object readStatus;

    /**
     * 是否删除，0-未删除，1-已删除
     */
    private Integer isDeleted;

    /**
     * 创建时间
     */
    private Date createdAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 唯一标识符
     */
    public Long getId() {
        return id;
    }

    /**
     * 唯一标识符
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 发送者用户ID
     */
    public Long getSenderEmployeeId() {
        return senderEmployeeId;
    }

    /**
     * 发送者用户ID
     */
    public void setSenderEmployeeId(Long senderEmployeeId) {
        this.senderEmployeeId = senderEmployeeId;
    }

    /**
     * 接收者用户ID
     */
    public Long getReceiverUserId() {
        return receiverUserId;
    }

    /**
     * 接收者用户ID
     */
    public void setReceiverUserId(Long receiverUserId) {
        this.receiverUserId = receiverUserId;
    }

    /**
     * 消息文本内容
     */
    public String getMessageText() {
        return messageText;
    }

    /**
     * 消息文本内容
     */
    public void setMessageText(String messageText) {
        this.messageText = messageText;
    }

    /**
     * 发送时间
     */
    public Date getSentAt() {
        return sentAt;
    }

    /**
     * 发送时间
     */
    public void setSentAt(Date sentAt) {
        this.sentAt = sentAt;
    }

    /**
     * 消息类型
     */
    public Object getMessageType() {
        return messageType;
    }

    /**
     * 消息类型
     */
    public void setMessageType(Object messageType) {
        this.messageType = messageType;
    }

    /**
     * 关联的订单ID，如果有
     */
    public Long getRelatedOrderId() {
        return relatedOrderId;
    }

    /**
     * 关联的订单ID，如果有
     */
    public void setRelatedOrderId(Long relatedOrderId) {
        this.relatedOrderId = relatedOrderId;
    }

    /**
     * 阅读状态，未读/已读
     */
    public Object getReadStatus() {
        return readStatus;
    }

    /**
     * 阅读状态，未读/已读
     */
    public void setReadStatus(Object readStatus) {
        this.readStatus = readStatus;
    }

    /**
     * 是否删除，0-未删除，1-已删除
     */
    public Integer getIsDeleted() {
        return isDeleted;
    }

    /**
     * 是否删除，0-未删除，1-已删除
     */
    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    /**
     * 创建时间
     */
    public Date getCreatedAt() {
        return createdAt;
    }

    /**
     * 创建时间
     */
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Messages other = (Messages) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSenderEmployeeId() == null ? other.getSenderEmployeeId() == null : this.getSenderEmployeeId().equals(other.getSenderEmployeeId()))
            && (this.getReceiverUserId() == null ? other.getReceiverUserId() == null : this.getReceiverUserId().equals(other.getReceiverUserId()))
            && (this.getMessageText() == null ? other.getMessageText() == null : this.getMessageText().equals(other.getMessageText()))
            && (this.getSentAt() == null ? other.getSentAt() == null : this.getSentAt().equals(other.getSentAt()))
            && (this.getMessageType() == null ? other.getMessageType() == null : this.getMessageType().equals(other.getMessageType()))
            && (this.getRelatedOrderId() == null ? other.getRelatedOrderId() == null : this.getRelatedOrderId().equals(other.getRelatedOrderId()))
            && (this.getReadStatus() == null ? other.getReadStatus() == null : this.getReadStatus().equals(other.getReadStatus()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSenderEmployeeId() == null) ? 0 : getSenderEmployeeId().hashCode());
        result = prime * result + ((getReceiverUserId() == null) ? 0 : getReceiverUserId().hashCode());
        result = prime * result + ((getMessageText() == null) ? 0 : getMessageText().hashCode());
        result = prime * result + ((getSentAt() == null) ? 0 : getSentAt().hashCode());
        result = prime * result + ((getMessageType() == null) ? 0 : getMessageType().hashCode());
        result = prime * result + ((getRelatedOrderId() == null) ? 0 : getRelatedOrderId().hashCode());
        result = prime * result + ((getReadStatus() == null) ? 0 : getReadStatus().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", senderEmployeeId=").append(senderEmployeeId);
        sb.append(", receiverUserId=").append(receiverUserId);
        sb.append(", messageText=").append(messageText);
        sb.append(", sentAt=").append(sentAt);
        sb.append(", messageType=").append(messageType);
        sb.append(", relatedOrderId=").append(relatedOrderId);
        sb.append(", readStatus=").append(readStatus);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}